﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Cm.Web.Models;

namespace Cm.Web.Controllers
{
    public class TemplateController : Controller
    {
        List<TemplateModel> list = new List<TemplateModel>();
        public TemplateController()
            : base()
        {
            list.Add(new TemplateModel
            {
                Name = "刘双陶",
                Age = 25,
                IsBoy = true,
                Email = "somtomking@163.com",
                Address = new Address
                {
                    Country = "中国",
                    District = "西湖区文一西路北2区7号",
                    City = "杭州市"
                }

            });
        }
        //
        // GET: /Template/

        public ActionResult Index()
        {
            return View();
        }
        public ActionResult List()
        {
            return View(list);
        }
        public ActionResult Edit()
        {
            return View(new TemplateModel());
        }
        public ActionResult Detail()
        {
            return View(list[0]);
        }
    }
}
